import React from 'react'
import { Provider } from "react-redux";
import store from "@src/store";
import { PersistGate } from "redux-persist/integration/react";
import { persistStore } from "redux-persist";

const persistor = persistStore(store);

interface Props {
  children: React.ReactNode;
}

export default function AppStoreProvider(props:Props) {
  return (
      <Provider store={store}>
        <PersistGate persistor={persistor}>{props.children}</PersistGate>
      </Provider>
  )
}


